﻿<BaseUI:UserControlBase
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:BaseUI="clr-namespace:Silverlight.Weblog.Client.Default.Widgets.BaseUI"
	mc:Ignorable="d"
	xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.LinksSideBarWidgetViewModelSampleData"
	xmlns:Silverlight_Weblog_Client_DAL_Events="clr-namespace:Silverlight.Weblog.Client.DAL.Events;assembly=Silverlight.Weblog.Client.DAL"
	xmlns:Commands="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
	x:Class="Silverlight.Weblog.Client.Default.Widgets.LinksSidebarWidget"
	d:DesignWidth="200" d:DesignHeight="78" >

	<BaseUI:UserControlBase.Resources>
		<SampleData:LinksSideBarWidgetViewModelSampleData x:Key="LinksSideBarWidgetViewModelSampleData" d:IsDataSource="True"/>
	</BaseUI:UserControlBase.Resources>

	<StackPanel x:Name="LayoutRoot" d:DataContext="{Binding Source={StaticResource LinksSideBarWidgetViewModelSampleData}}">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="AboutStates">
				<VisualState x:Name="ShowAbout"/>
				<VisualState x:Name="HideAbout">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="hyperlinkButton" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<HyperlinkButton Height="16" Grid.ColumnSpan="2" d:LayoutOverrides="Height" Margin="0" VerticalContentAlignment="Center"
                                 Commands:Click.Command="{Binding RaiseNavigateToHomePageEvent}"
                                 Commands:Click.CommandParameter="{Binding Model}">
			<StackPanel Orientation="Horizontal">
				<Image Height="16" Width="16" Source="HomeIcon.jpg" Stretch="Fill"/>
				<HyperlinkButton BorderThickness="0,0,10,0" Margin="5,0,0,0" Content="Home"
                                 Commands:Click.Command="{Binding RaiseNavigateToHomePageEvent}"
                                 Commands:Click.CommandParameter="{Binding Model}"
                                 />
			</StackPanel>
		</HyperlinkButton>
		<HyperlinkButton Height="16" Grid.ColumnSpan="2" Grid.Row="1" d:LayoutOverrides="Height" NavigateUri="{Binding RSS, Mode=OneWay}" Margin="0,2,0,0" VerticalContentAlignment="Center">
			<StackPanel Orientation="Horizontal">
				<Image Height="16" Width="16" Source="RssIcon.jpg" Stretch="Fill"/>
				<HyperlinkButton BorderThickness="0,0,10,0" Margin="5,0,0,0" Content="RSS" NavigateUri="{Binding RSS, Mode=OneWay}"/>
			</StackPanel>
		</HyperlinkButton>
		<HyperlinkButton Height="16" NavigateUri="{Binding Atom, Mode=OneWay}" Margin="0,2,0,0" d:LayoutOverrides="Height" VerticalContentAlignment="Center">
			<StackPanel Orientation="Horizontal">
				<Image Height="16" Width="16" Source="AtomIcon.jpg" Stretch="Fill"/>
				<HyperlinkButton BorderThickness="0,0,10,0" Margin="5,0,0,0" Content="Atom" NavigateUri="{Binding Atom, Mode=OneWay}"/>
			</StackPanel>
		</HyperlinkButton>
		<HyperlinkButton x:Name="hyperlinkButton" Height="16" Grid.ColumnSpan="2" Grid.Row="2" d:LayoutOverrides="Height" Margin="0,2,0,0" VerticalContentAlignment="Center"
                                 Commands:Click.Command="{Binding RaiseGoToBlogPostPermlinkEvent}"
                                 Commands:Click.CommandParameter="{Binding AboutBlogPostPermlink}">
			<StackPanel Orientation="Horizontal">
				<Image Height="16" Width="16" Source="AboutIcon.jpg" Stretch="Fill"/>
				<HyperlinkButton BorderThickness="0,0,10,0" Margin="5,0,0,0" Content="About Me" 
                                 Commands:Click.Command="{Binding RaiseGoToBlogPostPermlinkEvent}"
                                 Commands:Click.CommandParameter="{Binding AboutBlogPostPermlink}"
                                 />
			</StackPanel>
		</HyperlinkButton>
	</StackPanel>
</BaseUI:UserControlBase>